//一般直接写在一个js文件中
layui.use(['element','form','laydate'],function () {
    var form = layui.form;
    form.on('select(repairaDeviceId)', function(data){
        var $selected_DeviceId = $(data.elem).find("option:selected");
        $("#devicesCode").val($selected_DeviceId.data("code"));
        $("#devicesName").val($selected_DeviceId.data("name"));
    });
});